<md-content class="page-content toolbar-page">
	<div class="page-toolbar" layout>
		<div flex layout layout-align="start center">
			<md-button class="md-primary" ui-sref="login">
				<span class="icon icon-chevron-left"></span>
				会员注册
			</md-button>
		</div>
	</div>
	<md-content class="page-body padding">
		<form name="registerForm" ng-submit="register(member)">
			<input type="submit" style="display: none"/>
			<md-input-container>
				<label>会员姓名</label>
				<input type="text" name="name" auto-focus-input='' required ng-model="member.name" maxlength="20"/>

				<div ng-messages="registerForm.name.$error">
					<div ng-message="pattern" ng-show="registerForm.name.$error">请输入姓名。</div>
				</div>
			</md-input-container>
			<md-input-container>
				<label>手机号码</label>
				<input type="text" name="mobile" required ng-model="member.mobile"/>

				<div ng-messages="registerForm.mobile.$error">
					<div ng-message="pattern" ng-show="registerForm.mobile.$error">请输入手机号码。</div>
				</div>
			</md-input-container>

			<div layout="row" layout-align="start center" class="padding-tb">
				<div class="x-light">性别</div>
				<div style="width: 1em;"></div>
				<md-radio-group ng-model="member.sex" layout="row">
					<md-radio-button value="0" class="md-primary">男</md-radio-button>
					<md-radio-button value="1"> 女</md-radio-button>
				</md-radio-group>
			</div>
			<!--<md-input-container>-->
				<!--<label>出生年月</label>-->
				<!--<input type="date" name="birthDay" ng-model="member.birth"/>-->
			<!--</md-input-container>-->
			<div layout="row" layout-align="center center">
				<md-input-container style="width: inherit;" flex="">
					<label>验证码</label>
					<input type="text" md-maxlength="6" minlength="6" maxlength="6" name="autoCode" required ng-model="member.autoCode" pattern="[0-9]*"/>

					<div ng-messages="registerForm.autoCode.$error">
						<div ng-message="pattern" ng-show="registerForm.autoCode.$error.pattern">验证码必须是数字。</div>
					</div>
				</md-input-container>
				<div class="md-raised md-button" ng-click="sendCode(member.mobile)" ng-class="{'disabled':smsBlocked}"><span class="s-text"><span
						ng-if="!smsBlocked">获取验证码</span><span
						ng-if="smsBlocked">{{againTime}}秒后可再次发送</span></span></div>
			</div>
		</form>
		<section layout="column">
			<md-button class="md-raised md-primary btn-l" ng-click="register(member)" layout flex style="width: 95%;">确认</md-button>
		</section>
	</md-content>
</md-content>
